package com.laycoding.consumer.service;

import com.laycoding.consumer.config.MqTopicConstant;
import lombok.extern.log4j.Log4j2;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * created with IntelliJ IDEA.
 *
 * @author: guidada
 * @date: 2021/04/09/15:17
 * @description:
 */
@Service
@Log4j2
@RocketMQMessageListener(topic = MqTopicConstant.DEMO_TOPIC
        , consumerGroup = MqTopicConstant.DEMO_CONSUMER_GROUP_MODIFY
        , selectorExpression = MqTopicConstant.DEMO_TAG_MODIFY)
public class MqUpdateListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
          log.info("注册信息---"+s);
    }
}
